﻿package com.mui.controls
{
    import flash.display.*;

    public class BaseToolTip extends Sprite implements IToolTip
    {
        protected var paddingTop:Number = 5;
        protected var paddingBottom:Number = 5;
        protected var paddingLeft:Number = 5;
        protected var paddingRight:Number = 5;
        protected var _width:Number;
        protected var _height:Number;
        protected var _contentContainer2D:Sprite;

        public function BaseToolTip()
        {
            this._contentContainer2D = new Sprite();
            return;
        }// end function

        public function get contentContainer2D() : Sprite
        {
            return this._contentContainer2D;
        }// end function

        public function set contentContainer2D(param1:Sprite) : void
        {
            this._contentContainer2D = param1;
            return;
        }// end function

        protected function updateSize(param1:Number, param2:Number) : void
        {
            return;
        }// end function

        public function set data(param1) : void
        {
            this._width = this.contentContainer2D.width + this.paddingLeft + this.paddingRight;
            this._height = this.contentContainer2D.height + this.paddingTop + this.paddingBottom;
            this.contentContainer2D.y = this.paddingTop;
            this.contentContainer2D.x = this.paddingLeft;
            this.updateSize(this._width, this._height);
            return;
        }// end function

        override public function get width() : Number
        {
            return this._width;
        }// end function

        override public function get height() : Number
        {
            return this._height;
        }// end function

    }
}
